package http

import (
	httpHandler "gitee.com/zaiqiang231/go-base-session/app/http/handler"
	"github.com/gin-gonic/gin"
)

func InitRouter(g *gin.Engine) {
	g.Use(gin.Logger(), gin.Recovery())
	//跨域 设置
	g.Use(httpHandler.Cors())

	g.POST("/createToken", httpHandler.CreateToken)
	g.POST("/checkToken", httpHandler.CheckToken)

	g.POST("/createSession", httpHandler.CreateSession)
	g.POST("/checkSession", httpHandler.CheckSession)

}
